/*
 * =====================================================================================
 *
 *       Filename:  main.c
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  2025/02/24 22时40分33秒
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  ...
 *   Organization:  
 *
 * =====================================================================================
 */
#include<fuquOS/type.h>
#include<fuquOS/printk.h>
#include<fuquOS/gdt.h>
#include<fuquOS/idt.h>
#include<fuquOS/pit.h>
#include<fuquOS/timer.h>
#include <fuquOS/kernel_conf.h>

#include<fuquOS/memory.h>
#include<fuquOS/cpu.h>
#include<fuquOS/stdio.h>
#include<fuquOS/tools.h>
#include<fuquOS/block.h>
#include<fuquOS/fat32.h>
#include<fuquOS/string.h>

void kernel_main() {
	clear();
	printk("this is c\n");


	gdt_init();
	printk("gdt is init\n");

	idt_init();
	printk("idt is init\n");

	init_memory_pool();
	printk("memory_poll is init\n");
	memory_init();
	printk("memory is init\n");
	// 在memory_init()中初始化内存后，才可以使用kmalloc

	cpu_init();
	printk("cpu is init\n");
	print_cpu_info();

	block_init();

	fat32_init();



	while(1){
		asm volatile("hlt");
	}
}

